package com.baizhi.appController;

import com.baizhi.service.ArticleService;
import com.baizhi.service.HomePageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * Created by Administrator on 2019/4/6.
 */
@RestController()
@RequestMapping("AppArticleController")
public class AppArticleController {
    @Autowired
    private ArticleService articleService;


    //查询关注上师的文章
    @GetMapping("selectGuruArticle.do/{userId}")
    public Map selectGuruArticle(@PathVariable("userId")Integer userId){
        return articleService.selectGuruArticle(userId);
    };


    //查询所有的文章
    @GetMapping("selectAllArticle.do")
    public Map selectAllArticle(){
        return articleService.selectAllArticle();
    };

}
